-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inventory: Implement aggregation of multiple variable values #408
Conversation
0db1e4c
to
3d7e94b
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 41s |
423e008
to
5222258
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 19s |
This commit fixes the aggregation of multiple host variables values. Let's say SNow returns something like this: ``` {'u_name': 'First_app', 'u_parent': 'tomcat_aqwidmvs', 'sys_id': 'a7dc8d0633a8d210392d0e570e5c7bb4', 'u_child': 'i101', 'u_level': '1', 'u_child.name': 'i101', 'u_child.ip_address': '10.1.0.101', 'u_parent.support_group': 'Application Development', 'u_parent.name': 'tomcat_aqwidmvs'} {'u_name': 'Second app', 'u_parent': 'tomcat_pxgnodig', 'sys_id': 'f9fc8d0633a8d210392d0e570e5c7bff', 'u_child': 'i101', 'u_level': '1', 'u_child.name': 'i101', 'u_child.ip_address': '10.1.0.101', 'u_parent.support_group': 'Application Development', 'u_parent.name': 'tomcat_pxgnodig'} ``` For the same host, we have two records with different values: u_parent, u_parent.name, u_parent.support_group, u_parent.name. This change will aggreate these values as follows: ``` all: children: ungrouped: hosts: i101: sys_id: a7dc8d0633a8d210392d0e570e5c7bb4 u_child: - ip_address: 10.1.0.101 name: i101 u_level: '1' u_parent: - name: tomcat_aqwidmvs support_group: Application Development u_parent: tomcat_aqwidmvs - name: tomcat_pxgnodig support_group: Application Development u_parent: tomcat_pxgnodig u_type: active ``` To enable this aggregation, the inventory must have: ``` experimental_aggregation: true ```
5222258
to
e119c66
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 2m 45s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 48s |
This PR fixes the aggregation of multiple host variable values.
Let's say SNow returns something like this:
For the same host, we have two records with different values: u_parent, u_parent.name, u_parent.support_group, u_parent.name.
This change will aggregate these values as follows:
To enable this aggregation, the inventory must have: